const { post } = require("./fetch.js")
const { contractId } = require("./contractId.js")

async function createContract(data) {
  try {
    const response = await post('/api/helloris/contract/approve', data);
    console.log(response.data);
  } catch (error) {
    console.error('请求失败:', error);
  }
}

// 调用函数
const postData = {"contractId":contractId,"contractVersion":0,"approveStatus":2}

// createContract(postData);

const audit = (contractId)=> {
    postData.contractId = contractId;
    return createContract(postData);
}

module.exports = {
    audit
}

